package global;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/7/29 13:31
 * Version:1.0-SNAPSHOT
 * Description:
 */
// 该类使用@ControllerAdvice进行标注
// 表示当前类是一个全局异常处理类
//@ControllerAdvice
public class GlobalException {

    @ExceptionHandler
    public ModelAndView exceptionHandler(Exception e){
        e.printStackTrace();
        return new ModelAndView("globalException","e",e);
    }

}
